homepage Welcome to WebmasterWorld Guest from 54.198.94.76
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
T STRING Error in code
greencode




msg:4257478
 7:23 pm on Jan 24, 2011 (gmt 0)

I am wanting to insert this bit of code

_e( 'Read more', 'Translation' );

into this section of my code

$return_html.= '<a class="red" href="'.get_permalink($post->ID).'">_e( 'Read more', 'Translation' );</a></li>';

but I keep getting T_STRING errors when doing so. I'm really not to up to speed with PHP and I'm sure it's something fairly simple.

Any ideas or help would be greatly appreciated.

 

Matthew1980




msg:4257488
 7:36 pm on Jan 24, 2011 (gmt 0)

Hi there greencode,

Try this:-

$return_html.= '<a class="red" href="'.get_permalink($post->ID).'">'._e( 'Read more', 'Translation' ).'</a></li>';

I think that's Ok, you needed to concatenate the string.

Have fun.

Cheers,
MRb

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved