php - split() deprecated. How to convert? -


this question has answer here:

i have piece of code that's using split() function. php complaining function deprecated. how can converted non deprecated split?

if(!empty($vis_settings['url']['urls'])){     $split_urls=split("[\n ]+",(string)$vis_settings['url']['urls']); 

you can use preg_split.

$split_urls = preg_split("/[\n ]+/",(string) $vis_settings['url']['urls']); 

Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -