On one of my projects, my site's pages are self registered. Each user page has a tag in it like this: $page_id="10";
I am currently working on a design tool that will allow my user to redesign his menu on the fly, allowing them to add, remove, and edit menu items. The only problem is that any page that is self registered cannot have their database item_number changed.
What I need is a way to search a PHP page to see if a page_id is set, and if so, what the number is. I would probably open the file in a traditional way, but I'm trying to figure out the best way to do the search and return the number.
Should I use preg_match() or strpos() or perhaps there's even a better method? Remember, I need to return the registered page number if it exists.
Any input would be appreciated. TIA