Jump to content

Archived

This topic is now archived and is closed to further replies.

Nothadoth

a quick question about variables

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.