Jump to content

[SOLVED] Explode() - Help


Ryuujin

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/78618-solved-explode-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.