NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Search within an array of variables


Joined: 13 Jun 2006
Posts: 17
Reply with quote
Is there any way within phpEd to search within an an array or object for a particular string (actually step through all values looking for a string match) during a debugging session without writing a function for it?

Something like "Right-click a variable in your watch list and then click on "search array" and then provide the string you want to search for"?

_________________
MB
View user's profileFind all posts by mbrinsonSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I'm not aware of any way of doing a search. It might be useful if an array in the watch list could filter to show specific elements, for example all the HTTP elements in the $_SERVER array or all elements that contain a value matching a pattern. I think you would have to write a custom function and use it from the Immediate panel.

However, you can add array elements to the watch list, so you could for example do a watch on $_SERVER['HTTP_COOKIE'] A shortcut for doing that is to examine the watch of a full array then right-click an element then choose New watch from here. This does actually satisfy most of my own array watching requirements, but unfortunately doesn't work on object properties as whilst the command is available, I found nothing gets shown, although it does work on array elements within object properties Confused
View user's profileFind all posts by plugnplaySend private message
Search within an array of variables
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic