bftwofreak Posted September 21, 2008 Share Posted September 21, 2008 I seem to be having issues with my explode(); Here's my code snippet: $num[$i] = '6Â (0.001)'; $num[$i] = explode('Â ', $num[$i], 2); echo $num[$i][0]; When I do that it returns the entire initial string... Link to comment https://forums.phpfreaks.com/topic/125152-explode-problems/ Share on other sites More sharing options...
JasonLewis Posted September 21, 2008 Share Posted September 21, 2008 When I ran that code I got '6' returned. ??? Link to comment https://forums.phpfreaks.com/topic/125152-explode-problems/#findComment-646867 Share on other sites More sharing options...
bftwofreak Posted September 21, 2008 Author Share Posted September 21, 2008 what's your print_r(); of the array? Link to comment https://forums.phpfreaks.com/topic/125152-explode-problems/#findComment-646872 Share on other sites More sharing options...
JasonLewis Posted September 21, 2008 Share Posted September 21, 2008 This is the code I used: $i = 1; $num[$i] = '6Â (0.001)'; $num[$i] = explode('Â ', $num[$i], 2); echo "<pre>", print_r($num[$i]), "</pre>"; This is the output: Array ( [0] => 6 [1] => (0.001) ) Link to comment https://forums.phpfreaks.com/topic/125152-explode-problems/#findComment-646875 Share on other sites More sharing options...
bftwofreak Posted September 21, 2008 Author Share Posted September 21, 2008 if you want to take a look at it on my site: http://www.updominon.com/modules.php?name=Halo_3_Stats&tag=threesixohfreak&i=medals Link to comment https://forums.phpfreaks.com/topic/125152-explode-problems/#findComment-646877 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.