By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

problem with preg_match_all() ????

P: 12
hi all,
i am trying to slove this but i can't.....
any one??????
code in php:-

Expand|Select|Wrap|Line Numbers
  1. $found = preg_match_all('#<'.$element_name.'(?:\s+[^>]+)?>(.*?)'.'</'.$element_name.'>#s',$xml,$matches);

error occured:-preg_match_all() expects parameter 2 to be string, array
Jan 21 '12 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
$xml seems to be an Array, but it has to be a string.
Jan 23 '12 #2

P: 12
yes,$xml is an array.....
so how can i do this?????
please....
thank you....
Jan 23 '12 #3

Dormilich
Expert Mod 5K+
P: 8,639
what does the array contain?
Jan 23 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.