rajmohan Posted November 1, 2006 Share Posted November 1, 2006 Hai guys, i am in trouble now actually i have a values like this$one =a,b,c,d,e;$two=aa,bb,cc,dd,ee;i want to print this one like thisone two----------a aab bbc ccd dde eecan any one please tell me Link to comment https://forums.phpfreaks.com/topic/25779-how-to-print-this-one-see-here/ Share on other sites More sharing options...
heckenschutze Posted November 1, 2006 Share Posted November 1, 2006 one such simple method:[code]<?php$one = "a,b,c,d,e";$two= "aa,bb,cc,dd,ee";$aOne = explode(',', $one);$aTwo = explode(',', $two);$iNumOne = count($aOne);echo "<table><tr><td>one</td><td>two</td></tr>";for($x = 0; $x < $iNumOne; $x++){ echo "<tr><td>" . $aOne[$x] . "</td><td>" . $aTwo[$x] . "</td></tr>";}echo "</table>";?>[/code] Link to comment https://forums.phpfreaks.com/topic/25779-how-to-print-this-one-see-here/#findComment-117713 Share on other sites More sharing options...
redarrow Posted November 1, 2006 Share Posted November 1, 2006 or somethink like this a diffrent way but formated diffrent.[code]<?phpecho"<table border='4'><tr><td>";$a=array('a','b','c','d','e','f','g');$b=array('aa','bb','cc','dd','ee','ff','gg');$c=array_merge($a, $b);$x=implode(" " , $c);$results=wordwrap($x,2,"<br>",1); echo $results;echo"</table></tr><td>";?> [/code] Link to comment https://forums.phpfreaks.com/topic/25779-how-to-print-this-one-see-here/#findComment-117718 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.