I need php function for search data(text) inside a html table. not a my sql table. ex: inside a table "<table><tr><td>******</td></tr></table>" i have several text. i need php function to search one of the text. please help to solve this issue
You would want to use a regexp with preg_match or preg_match_all or something similar. Something like: '/\<table\>\<tr\>\<td\>(.+)\<\/td\>\<\/tr\>\<\/table\>/' In your example this would return the asterisks: ******.
I need php function for search data(text) inside a html table. not a my sql table. ex: inside a table "<table><tr><td>some text here</td></tr></table>" i have several text. i need php function to search one of the text and assign to the php variable with the position where the word is. or can u pls suggest the way of finding the text in a hrml table. please help to solve this issue
use strpos() for position and preg_match for content inside it. Combine those two and you should be fine.