Jump to content

split array into two arrays


Recommended Posts

I am writing a script that converts php pages to html pages for mobile devices with no net connection. I have an multi-dimensional array of urls and their replacement values:

 

$links=array($phpURL,$fixedURL);

 

Can I break this into two arrays, one containing all $phpURL's and another array containing all $fixedURL's?

 

 

Here is what I am ultimately trying to do, if there is a cleaner way of doing it by all meansplease let me know.

$text=str_replace($phpURLarray, $fixedURLarray, $text);

 

 

Thank you once again for rescuing me from myself,

                                                                          Todd

 

Link to comment
https://forums.phpfreaks.com/topic/161380-split-array-into-two-arrays/
Share on other sites

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.