southbeach
Programmer
I found sample #2 here
which claims to do exactly what I need but it is giving me a warning or error.
The syntax is as follows
If I add @ to prefix the split() function, no warning comes up on screen but the call fails, variables are empty.
All that said, am I doing something wrong or is the sample listed on php.net misleading ???
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
which claims to do exactly what I need but it is giving me a warning or error.
Code:
Warning: split() [function.split]: REG_ERANGE in /usr/haf/web/default.php on line 13
Warning: split() [function.split]: REG_ERANGE in /usr/haf/web/default.php on line 14
The syntax is as follows
Code:
list($mA,$dA,$yA)=split('[/-.]', $valA);
list($mB,$dB,$yB)=split('[/-.]', $valB);
if ($valA != '') $valA = $yA.'/'.$mA.'/'.$dA;
if ($valB != '') $valB = $yB.'/'.$mB.'/'.$dB;
If I add @ to prefix the split() function, no warning comes up on screen but the call fails, variables are empty.
All that said, am I doing something wrong or is the sample listed on php.net misleading ???
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.