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
Post a Comment