Jump to content

[SOLVED] PHP SPLIT a string


solon

Recommended Posts

Hey guys i need to seperate a string of numbers

 

i.e

 $var1 = "43 56 88 02 66 21";

 

i need a way to separate those numbers after the space! so the result of the function should be an array with the values as follows:

 

$arr[0] = "43"
$arr[1] = "56"
$arr[2] = "88"
$arr[3] = "02"
$arr[4] = "66"
$arr[5] = "21"

 

Thanks in advance for any help

 

Link to comment
https://forums.phpfreaks.com/topic/137510-solved-php-split-a-string/
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.