Re: explode and PATH_SEPARATOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Nov 15, 2004, at 10:17 AM, Francisco M. Marzoa Alonso wrote:

Taking this code:

<pre>
<?php

define (PATH_SEPARATOR, "/");

$String="Root/One/Two/Three/Last";

$arr = explode ( PATH_SEPARATOR, $String );
var_dump ( $arr );

$arr = explode ( "/", $String );
var_dump ( $arr );
?>
</pre>

PATH_SEPARATOR is is a predefined constant, so you'll need to use something else, but you still need to put quotes around it:


define('NOT_PATH_SEPARATOR', '/');

-ryan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux