help pointing to a directory

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   help pointing to a directory
SoftTag
CZ Super Newbie
 Codezwiz Site Donator
SoftTag has been a member for over 20 year's 20 Year Member
usa.gif newmexico.gif
Age: 35
Gender: Male
Status: Offline
Joined: Jun 30, 2004
0.01 posts per day
Posts: 44
Points: 5,366
   
Im trying to make a block point to a directory as in:
[ Register or login to view links on this board. ]
well it goes to the site, and has the referrer
but it does not have the $dir

What it is suppose to do is take them image that is is displaying such as 3402.jpg apart, and use the "3" for the directory. so it would look like this finished:
[ Register or login to view links on this board. ]

what I am getting is: [ Register or login to view links on this board. ]

the code Im using is giving me the last 4 numbers and .jpg instead of just the first number alone.

$dir = substr($itemnum, strrpos($itemnum, "/")+1, strlen($itemnum));

$content = "<br><center><a href=\"http://www.amazon.com/item/$dir/$itemnum?referrer=$amazon_id\" target=\"_blank\">";

Help Please?




_________________
Tag
Hugssssssssssss

[ Register or login to view links on this board.]
Back to top Reply with quote
#2   re: help pointing to a directory
SoftTag
CZ Super Newbie
 Codezwiz Site Donator
SoftTag has been a member for over 20 year's 20 Year Member
usa.gif newmexico.gif
Age: 35
Gender: Male
Status: Offline
Joined: Jun 30, 2004
0.01 posts per day
Posts: 44
Points: 5,366
   
Answer: $dir = substr($itemnum, 0,1);



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum