Hi :)

I want to place a particular image on a page based on the URL of the page. I
have a variety of standard patterns to match in the URL. For instance;

I would want all the following pages to load an image named something like
foo_2.jpg
mod.php?mod=userpage&menu=2&page_id=xxx
mod.php?mod=userpage&menu=200&page_id=xxx
mod.php?mod=userpage&menu=215&page_id=xxx
mod.php?mod=userpage&menu=20001&page_id=xxx
mod.php?mod=site_map&menu=20010

And would want all the following pages to load an image named something like
foo_1.jgp
mod.php?mod=userpage&menu=1&page_id=xxx
submit.php&menu=100
mod.php?mod=userpage&menu=10002&page_id=xxx

In all cases, I know for sure that in the URL I will find menu=x*

Can I set something up like;

if(menu = '2*') { $ImgNo = '2'; }
if(menu = '1*') { $ImgNo = '1'; }
if(menu = '') { $ImgNo = '3'; }

echo = "<img src=\"foo_$imgNo.jpg\">";

salut,
Verdon

Ps. If replying, please cc me as I am on digest


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to