Perad Posted December 11, 2009 Share Posted December 11, 2009 Hi, I have a string which looks like this. <p style=\"text-align: left;\"><b><i><u>Left</u></i></b><br></p> <p style=\"text-align: center;\"><b><i><u>Middle</u></i></b></p> <p style=\"text-align: right;\"><b><i><u>Right</u></i></b></p> What I need to do is create a associative array from the above string. Something like this. array ('p' => array ('style' => array ('text-align' => 'center', 'property2' => 'value2')), 'content' => '<b><i><u>Left</u></i></b><br>'); I then put it back together again in a different format. Any ideas how I would go about doing this? The only tag that will appear is a <p> tag. Quote Link to comment 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.