Ryuujin Posted November 23, 2007 Share Posted November 23, 2007 Hey guys, I have this script: <?php $str = file_get_contents("csvranks.html"); $pieces = explode(',', $str); echo "<table border='1'><tr><td>".$pieces[0]."</td><td>".$pieces[1]."</td><td>".$pieces[2]."</td><td>".$pieces[3]."</td><td>".$pieces[4]."</td></tr></table>"; ?> And this page as an output: http://www.ryu.kxs.in/MRC/test.php Now, look at the last table cell, where it has the space. Well, I want that removed and put into a NEW array. Any idea how I can separate the words when it runs into "," and spaces? Thanks guys! Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 23, 2007 Share Posted November 23, 2007 explode(" ",$pieces[4]); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.