Link to home
Start Free TrialLog in
Avatar of maccaj51
maccaj51Flag for Afghanistan

asked on

php strings within strings

Hi Experts,

I have this script for example...

$type = "blog";
$blog_form = "title,date";
$title_element = "hello";
$date_element = "1st October";

$form = explode(",", $I NEED TYPE IN HERE_form);
for($i = 0; $i < count($form); $i++){
      echo $$form[$i]_element;

}


Output being:

Hello 1st October


Any ideas would be swell!!

Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

what is $I NEED TYPE IN HERE_form just confused please elaborate little more
Avatar of maccaj51

ASKER

Sorry... I have found a solution...
good to hear tht
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is what I had done! cheers ray