karansokhey Posted August 24, 2008 Share Posted August 24, 2008 ??? i have no clue im lost at the moment. im using wordpress and i want to input a php statement inside src for an image but i get this error Parse error: syntax error, unexpected T_STRING in /home/xten/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 1 I am using this code.. how do i input the php for post_directory? <?php c2c_get_recent_posts(6, "<li><img src=\"http://www.xtencity.com/wp-content/<?php echo c2c_get_custom('post_directory'); ?>/cover.gif\" class=\"albums-cover\" alt=\"Album Cover\" /><br />%post_URL%</li>"); ?> Link to comment https://forums.phpfreaks.com/topic/121120-inserting-php-inside-php/ Share on other sites More sharing options...
jordanwb Posted August 24, 2008 Share Posted August 24, 2008 I know what you're trying to do: <?php $path= c2c_get_custom('post_directory'); c2c_get_recent_posts(6, "<li><img src=\"http://www.xtencity.com/wp-content/".$path."/cover.gif\" class=\"albums-cover\" alt=\"Album Cover\" /><br />%post_URL%</li>"); ?> Link to comment https://forums.phpfreaks.com/topic/121120-inserting-php-inside-php/#findComment-624404 Share on other sites More sharing options...
karansokhey Posted August 25, 2008 Author Share Posted August 25, 2008 thanks exactly what i meant Link to comment https://forums.phpfreaks.com/topic/121120-inserting-php-inside-php/#findComment-624632 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.