Jump to content

huntermiki

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

huntermiki's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks its really good answer tanks it solved i think
  2. it seems i didnt explain it good i have a include file with varables of 100 line and near 40 string that are not defined in this include file that if i dont use nowdoc and use heredoc instead i will get error because didnt define the variables inside string and i want to use this variables from include file in many places in code and before inserting or using them i will define that variables indside string i need to define this variables first single quoted and after that in other place in the code first define inner variables value and force php to parse main variable hope i can show this better this way $vara = <<<'END' my first name is {$first_name} END; in this part of code i didnt define $first_name so if i dont use nowdoc this will bring this error Notice: Undefined variable: first_name now in the main code i will include above code and then define first name and then i need to `vara` parse and replace `$first_one` part of string with its curent value mean // include above file and then $first_name = "tired"; echo $vara ; that should out some thing like this my name is tired i want to know is there any way for parsing inner varables on nowdoc
  3. hi i have problem using nowdoc i have some large string data that contain varable inside i have put them on file include.php like this <?php $var1 = <<<'FIRST' the first name is $varb FIRST; and included that in my code now i have something like this <?php include("include.php"); $varb = angry; echo $var1; ?> my problem is that how can i force php to parse varables inner strings need help and tired of googling
×
×
  • 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.