Jump to content


a quick question about variables

  • Please log in to reply
1 reply to this topic

#1 Nothadoth

  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 16 August 2006 - 12:47 PM

I have a variable this variable:

  $tarrif = $_POST['tarrif_name'];

That will hold for instance the word "Orange".

I need to now make another variable called $img which will be: tarrifs/".$tarrif."/".$tarrif.".jpg (tarrifs/Orange/Orange.jpg)

How can I do this?

I tried $img = "tarrifs/".$tarrif."/".$tarrif.".jpg"; and it didnt work.

#2 Jenk

  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 16 August 2006 - 12:55 PM

It will work providing the value is there.

Have you tried echoing $_POST['tarriff_name'] to see if the value is present?

What value does $img hold? (echo it)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users