Jump to content

duskshine

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

duskshine's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thank you very very much guys! * problem solved *
  2. Say I have a.php: ------------ <?php require_once "c.php"; ?> & b.php: ------------ <?php require_once "c.php"; ?> How may I code c.php so that it knows it's required by a.php and not b.php, without changing a.php & b.php? (that is, what should I use to replace the IF_REQUIRED_BY below?) c.php: ------------ <?php IF_REQUIRED_BY("a.php") echo "gotcha!" ?> Thanks,
  3. @Wuhtzu: i failed to find a solution using variable variable @MadTechie: i know that eval's dangerous but it seems i have to take what i have. the fact is..well, im taking codes from a freak who did not use template to support multi-language, instead he uses things like echo $TEXT["general-info"]; ---------------------- en.php: $TEXT["general-info"] = "Hello world."; ---------------------- fr.php: $TEXT["general-info"] = "Bonjour le monde."; that works at first...until he left and the boss decided to put $TEXT["general-info"] into a db. now i get the whole damned "template" from database and of course, it writes $TEXT["general-info"] instead of either Hello World or Bonjour. pretty dumb story i know..anyway, thank you guys very much
  4. We know that the following code outputs "1", $i=1; $str= "$i"; echo $str; and this code outputs "$i" $i=1; $str = "$"; $str .= "i"; echo $str; now my question is, suppose I have created a string using the second method, how may I force a string variable parsing to get it writes 1 instead of $i? thanks,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.