<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<?php
$dfhg = 'array('aaa'=>'1111111','bbbbbb
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php $dfhg = "array('aaa'=>'1111111','bbbbbb'=>'222222','cccccccccc'=>'333333'); "; $dfhg = preg_replace('/=>\s+/','=>',$dfhg); $skips = explode("\n",$dfhg); $lngc = array(); foreach($skips as $vlz=>$hkue){ if(preg_match('/[\"\'](.*?)[\"\'].*?=>/',$hkue) == 1){ preg_match('/[\"\'](.*?)[\"\'].*?=>/',$hkue,$ntent); $lngc[] = strlen($ntent[1]); } } $posm = array_search(max($lngc),$lngc); $szgz = $lngc[$posm]; $kogn = count($lngc) > 1 ? ' ' : ' '; foreach($skips as $yvlz){ $jkg = ''; if(preg_match('/[\"\'](.*?)[\"\'].*?=>/',$yvlz) == 1){ preg_match('/[\"\'](.*?)[\"\'].*?=>/',$yvlz,$ewent); $negc = strlen($ewent[1]); $forg = $szgz - $negc; for($j=0;$j<$forg;$j++){ $jkg .= ' '; } $zhvl = "'".$ewent[1]."'".$jkg.$kogn.'=> '; $dfhg = str_replace($ewent[0],$zhvl,$dfhg); } } preg_match_all('/=> array.*?\((.*?)\),/sim',$dfhg,$erge); foreach($erge[1] as $gshlm){ if(!strstr($gshlm,"\n")) continue; $skips = explode("\n",$gshlm); $lngc = array(); foreach($skips as $vlz=>$hkue){ if(preg_match('/[\"\'](.*?)[\"\'].*?=>/',$hkue) == 1){ preg_match('/[\"\'](.*?)[\"\'].*?=>/',$hkue,$ntent); $lngc[] = strlen($ntent[1]); } } $posm = array_search(max($lngc),$lngc); $szgz = $lngc[$posm]; $koge = count($lngc) > 1 ? ' ' : ' '; foreach($skips as $yvlz){ $jkg = ''; if(preg_match('/[\"\'](.*?)[\"\'].*?=>/',$yvlz) == 1){ preg_match('/[\"\'](.*?)[\"\'].*?=>/',$yvlz,$ewent); $negc = strlen($ewent[1]); $forg = $szgz - $negc; for($j=0;$j<$forg;$j++){ $jkg .= ' '; } $zhvl = "'".$ewent[1]."'".$jkg.$koge.'=>'; $dfhg = str_replace($ewent[0],$zhvl,$dfhg); } } } echo $dfhg; ?>
评论列表
发表评论
热评文章
相关阅读