variables

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
miguelna
New php-forum User
New php-forum User
Posts: 15
Joined: Wed Sep 04, 2002 12:53 am

Thu Dec 12, 2002 7:53 am

Code: Select all

$arr1 = array(“al”,”na”,”cl”,”pb”);

$bol_al = “abcd”;
$bol_na = “fghhd”;
$bol_cl = “fghdfg56”;

foreach($arr1 as $k => $v) {

$ddd = $bol_$v //don’t work

}


I want pass to variable $ddd the value of $bol_...

How can I do that?

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Thu Dec 12, 2002 8:22 am

Strange quotes....
Fuul code please...
and what's is $bol_$v? where is you get this?
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 1 guest