well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm trying to take individual search terms that are being $_POSTed and highlighting them in the search results.
The Original Post talked about using str_replace to handle this. New problem, though, when the same search terms show up inside a HTML tag (like <img src="search_term">).
I'm trying "/b(?!<.+?>)search_termb/" -- but it's still finding "search_term" inside <img src="search_term">.
PHP4 to PHP5 Conversion
Hi Everyone,I am working on a site that is built up on PHP4 and each page is being started from <? instead of <?php as of PHP5.I want to convert this <? to <?php on every
Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What fields should go to sql table, after username and password? How to keep data in cookies safely? And
passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input
Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.Code: $moderators = array('Admin', 'banana', 'orange');if (in_array("{$_SESSION['user_name']}", $moderators)) print('Found it!');i
Spaghetti Code
So.I've pretty much reached the point where I have so many isset s on one page that I can't tell what the page is supposed to do. In other words: spaghetti code. I just read a few tutorials on OOP,
Undefined variables
hi----------------------------------------------------------------------------------------------------error log "[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined
How to create a static html menu from a database
Hi,I have built a small cms which allows me to create simple html pages and then upload them to an ftp.Everything is working apart from the menu, I cant get my head round how to create the menu
smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i seem to have hit:There is an application which i am currently coding, which writes everything that
Onclick problem in Firefox
Hi, I am using a <label onclick="myfunction(this)"></label>. It doesn't seem to trigger in Firefox but works fine with ie. Does anyone know why?Thanks
Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/a6079442/public_html/rebuild/includes/csi.php on line 48Error in imagettfbbox