Nothadoth Posted August 16, 2006 Share Posted August 16, 2006 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. Link to comment https://forums.phpfreaks.com/topic/17731-a-quick-question-about-variables/ Share on other sites More sharing options...
Jenk Posted August 16, 2006 Share Posted August 16, 2006 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) Link to comment https://forums.phpfreaks.com/topic/17731-a-quick-question-about-variables/#findComment-75649 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.