Vivid Lust Posted July 19, 2008 Share Posted July 19, 2008 Ive seen this php "placeholder" being used when users are allowed to edit something and the "placeholder" translates as a php code similar to: <% X %> I doubt ive explained well enough because me, myself has no idea what this is but would like to use it on my website. Could someone point me in the right direction on what it is so i can search more efficiently for some tutorials??? Thanks in advanced - Vivid Quote Link to comment https://forums.phpfreaks.com/topic/115607-php/ Share on other sites More sharing options...
ignace Posted July 19, 2008 Share Posted July 19, 2008 $subject = "a string with a placeholder"; echo str_replace("placeholder", "<?php echo 'lol';?>", $subject); // view source normally they write it to a file so when the file is loaded the php code is executed Quote Link to comment https://forums.phpfreaks.com/topic/115607-php/#findComment-594292 Share on other sites More sharing options...
Vivid Lust Posted July 19, 2008 Author Share Posted July 19, 2008 is this called anything in particular ??? And how would i use the code you posted ??? Say this was written in a html file: <% Count % > <Br><br><p>A cool paragraph</p> How would I include this in a php file and change the <% Count % > to some PHP code??? Im really sorry at my no0bness, im 15 and ive been learning php for less than a year. Quote Link to comment https://forums.phpfreaks.com/topic/115607-php/#findComment-594295 Share on other sites More sharing options...
Vivid Lust Posted July 19, 2008 Author Share Posted July 19, 2008 Dont worry, i understand now Quote Link to comment https://forums.phpfreaks.com/topic/115607-php/#findComment-594298 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.