dynamic strings
Is it possible to use php to create a string from a name in a file?
For example.
In a .txt file are the words: "fish" "cat" and "dog" (and a lot more which are unknown to me)
I then want to load a page which takes those words and translates them into strings, and then assign values to the new strings.
So for example "fish" becomes "$fish" and has a value of "55"
Is this possible? And what would the code be?
I've tried to make a string using something like the following, but that didn't work.
PHP Code:
<?
$name="wow";
$begin="$";
$newvariable=($begin+$name);
$stringvalue="55";
$newvariable=$newvariable."=".$stringvalue;
// gives $newvariable = "$wow=55"
echo ??????;
?>
How do I turn the contents of $newvariable into the string $wow ?
Thnx
<?php function reply_to_thread($user,$problem=NULL) {
if($user["nice"] === TRUE) { give_possible_solution($problem);}
else { exec($user,'code_fail',undefined); }
return TRUE; } ?>
Bookmarks