Jump to content

Deprecated: Function split() is deprecated in...


thealexangroup

Recommended Posts

ERROR:  Deprecated: Function split() is deprecated in... /adminPage.php on line 262

 

how would code look when (if) replaced with "explode"

 

260        <?
261        if($dtime){
262        $m=split('[-," "]',$dtime);
263        $s=date("jS F Y", mktime(0, 0, 0, $m[1], $m[2], $m[0]));
264        }

 

 

thanx in advance,

 

a

"/ (-|\s|) /"  

Are the spaces for readability or is this not "/(-|\s|)/" ?

 

I don't like "sed" myself because it does not meet my immediate needs.  Stream editing:  apples are apples, oranges are oranges.  The underling concept is there.

I always choose rpl over sed day to day because sed is so prone to miss firing.  Besides this the numerous variations of regexp which will accomplish quite the same objective is trivial functionality at best.  Not precisely hamfisted but I can read '[-," "]' and I don't see any clever ways to disguise just this.

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.