Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

variables

General discussions related to php

Moderators: macek, egami, gesf

variables

Postby miguelna » 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?
miguelna
New php-forum User
New php-forum User
 
Posts: 15
Joined: Wed Sep 04, 2002 12:53 am

Re: variables

Postby WiZARD » Thu Dec 12, 2002 8:22 am

Strange quotes....
Fuul code please...
and what's is $bol_$v? where is you get this?
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP General

Who is online

Users browsing this forum: No registered users and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.