php: Simple War script for your website
Moderator: Moderators
example:
[php]<?php
function auto_link($text) {
RETURN eregi_replace("(http://([a-zA-z0-9_-]+[\.]{1})*[\.]{0,1}[a-z]{2,3})","<a href=\"\\1\" target=\"_BLANK\">\\1</a>",$text);
}
echo auto_link("blablabla normal text, but this is a hyperlink: http://forums.aq2world.net");
?>
[/php]
The rest u can do urself basic php
Just put the function on top of ur source.
Then after u get the data from the db, do the auto_link.
or before u add the data to ur db
---
Some help:
http://nl.php.net/manual/en/function.eregi-replace.php
[php]<?php
function auto_link($text) {
RETURN eregi_replace("(http://([a-zA-z0-9_-]+[\.]{1})*[\.]{0,1}[a-z]{2,3})","<a href=\"\\1\" target=\"_BLANK\">\\1</a>",$text);
}
echo auto_link("blablabla normal text, but this is a hyperlink: http://forums.aq2world.net");
?>
[/php]
The rest u can do urself basic php
Just put the function on top of ur source.
Then after u get the data from the db, do the auto_link.
or before u add the data to ur db
---
Some help:
http://nl.php.net/manual/en/function.eregi-replace.php
There's a chopper coming in 3 days and there's a katana on top of the cafe and that's all you need to know
oh, thought of one thingie.. it would be cool if you can select different pictures, in this case.. flags.
have a look here
I wonder if you can do like this somehow, but using images instead?
and if.. how?! ;>
have a look here
Code: Select all
Type:<select name='type' size='1' id='type'><option>official</option><option>unofficial</option><option>eaql</option><option>naql</option></select><br>
I wonder if you can do like this somehow, but using images instead?
and if.. how?! ;>
Eg har blitt norrbagge :<