I am trying to get a script that makes my predefined keyword converted to links and / or converted to a certain color, size and so on... In one of the other threads Ive posted I got an answer I am a bit curious on, I'll just quote the answer, and hopefully some of you can help me with this.... see my answer below, and help If you want... I'll be forever grateful....
QuoteQuote from: Grayda on Today at 12:26:29 AM
I think I get it. You want certain words to be, say, red. And you want other words to be made in to a link? I think this should help:
Code:
<?php$mytext = "Buffalo with an aqualung";$mytext = str_replace("Buffalo", "<a href='buffalo.php'>Buffalo</a>", $mytext);$mytext = str_replace("aqualung", "<b>aqualung</b>", $mytext);echo $mytext
So when you run the script, Buffalo will be replaced with a link to buffalo.php and aqualung will be made bold.
That, of course, is the simple way to do it. You can get complex with regexes and whatnot, but if you're only doing a few things at a time, this is ideal.
bah.. Im still struggling with this... could anyone be helpful explaining to me how I can use this example in my site? I don't understand a thing, and probably shouldn't be messing with this kind of codes.. lol...
Before my text that needs to be converted I have three other pages included:
<?php include "../url/url.php"; ?>
<?php include "url.php"; ?>
<?php include "url/url.php"; ?>
These makes the top of my pages, and I was hoping that I could set the code in one of those so I don't have to copy&paste the script into every single page...
Don't I need any more script than those few lines?
Im desperate.... lol.... please help...
Get content from table into a list, without repeating.
Alright this is kinda an odd thing, so I need some help.I have a table "quote" with the three columns `id`, `quote`, and `author`.Now I am wondering if there is anyway that I can output all
php calculate
this code echoes correctly the sum but the inserted result is 0??Code:
Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code in php for creating a filename based on the user name as in the form.Thanks
what business processes?
Hi,
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..http://90.202.46.253thats the site, if u go on there, regsiter and login u will see that u can then
Need help adding a timestamp to my filename/variable
Hello, I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a form/php setup that allows a user to upload an image to my server. The upload is working well, and the code
Linux socket programming
Where can I find a good introduction to socket programming?
How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write a tool that will basically do the same thing, but web-based... so the user would enter a URL and
'210010106140040100' == '210010106140040101'
Debugging this simple line of a PHP scriptCode: if($a == $b){ } I've found that with value of$a = '210010106140040100' (type = string)$b = '210010106140040101' (type = string)the result of the
problems with php variables in mysql query
i can't seem to get the following query to work. select $q1c from $vote_rate where id = $recent_record LIMIT 0,1 ;this method did not work eitherselect .$q1c. from .$vote_rare. where id =