variables consisting of variables and non-variables

A

Anonymous

Guest
are you able to embed a variable in a new variable even if this new variable also consists of other things?

For example:
Code:
$search_for_string = '<a href=\"conShowCountry.asp?CountryID='.$country_number.'\">';
$data = explode($search_for_string,$source);
$searched_source = $data[1];

the above code gives me:
Parse error : parse error, unexpected T_VARIABLE

so is it possible to stick $country_number in $search with all that other stuff?
 
yes thats possible..
there seems to be parse err somewhere else in the script...
 
Riley said:
are you able to embed a variable in a new variable even if this new variable also consists of other things?

For example:
Code:
$search_for_string = '<a href="conShowCountry.asp?CountryID='.$country_number.'">';
$data = explode($search_for_string,$source);
$searched_source = $data[1];

the above code gives me:
Parse error : parse error, unexpected T_VARIABLE

so is it possible to stick $country_number in $search with all that other stuff?
sure what you ger the error cause youre string
$search_for_string = '<a href="conShowCountry.asp?CountryID='.$country_number.'">'; is <a href="conShowCountry.asp?CountryID=456456"> remove slashes
 
Back
Top