It returns an array with one element. <? $test = explode("no commas",","); echo $test; echo $test[0]; ?>
Array no commas -----Original Message----- From: David Martinez [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:13 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] explode... Here is the explode function: explode($delimiter, $string); This function looks in $string for the specified delimiter then splits up $string by $delimiter and returns those values into an array. I am using the explode() function to divide up a string into an array by commas. According to the PHP.net documentation, if the string passed to explode() does not have an instance of the specified $delimiter, the function will return the value of $string. However, I find when I use the function, if the specified $delimiter does not exist, explode() simply returns the word "Array." Any ideas as to why this is? --Dave -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php