beeger Posted February 8, 2013 Share Posted February 8, 2013 Ok im having a problem i just put a site up and for some reason i keep getting this error Deprecated: Function ereg() is deprecated in /home/u224246439/public_html/books.php on line 599 if i could get some help it would be wonderful Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/ Share on other sites More sharing options...
trq Posted February 8, 2013 Share Posted February 8, 2013 As the error suggests, the use of the ereg function is deprecated. See ereg. Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411183 Share on other sites More sharing options...
beeger Posted February 8, 2013 Author Share Posted February 8, 2013 ok now i have this problem Warning: preg_match(): No ending delimiter '^' found in /home/u224246439/public_html/music.php on line 599 Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411189 Share on other sites More sharing options...
Technocrat Posted February 9, 2013 Share Posted February 9, 2013 WIth out seeing the code its had to tell but your regex has to be inside of delimiters, / # are two common ones. For example '/\.mp3/' Might want to look at: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php And http://www.php.net/manual/en/book.pcre.php Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411192 Share on other sites More sharing options...
beeger Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) function xml2array($s) { if ($Atmp1=explode('>',$s,2) and preg_match('^<\?(xml .*)\?$',$Atmp1[0],$Atmp2)) { $A['xml']=$Atmp2[1]; xml2array_sub($A,$Atmp1[1]); } return $A; } is the code im having issues with Edited February 9, 2013 by beeger Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411193 Share on other sites More sharing options...
Technocrat Posted February 9, 2013 Share Posted February 9, 2013 Yeah you code doesnt have delimiters, it should be something like preg_match('/<\?(xml .*)\?$/',$Atmp1[0],$Atmp2) I would also use: http://www.rexv.org/ As its EXTREMELY helpful when testing Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411195 Share on other sites More sharing options...
beeger Posted February 9, 2013 Author Share Posted February 9, 2013 thank you very much worked Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411201 Share on other sites More sharing options...
trq Posted February 9, 2013 Share Posted February 9, 2013 ok now i have this problem Warning: preg_match(): No ending delimiter '^' found in /home/u224246439/public_html/music.php on line 599 Did you read this? http://www.php.net/manual/en/reference.pcre.pattern.posix.php Quote Link to comment https://forums.phpfreaks.com/topic/274237-in-need-of-some-help-please/#findComment-1411223 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.