Parse error: syntax error, unexpected 'meta' (T_STRING)

Discussion about any web related scripting languages like JavaScript, ASP, and PHP.
Post Reply
Phyx
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Tue Feb 16, 2016 8:26 pm

Parse error: syntax error, unexpected 'meta' (T_STRING)

Post by Phyx » Tue Feb 16, 2016 8:30 pm

I was following a tutorial and typed exactly what was written, giving me an parse error.
Parse error: syntax error, unexpected 'meta' (T_STRING)
The offending line is:
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'Pretty' ) . '</span>', ", ", "</span><span class="meta-sep">|</span>" ) ?>
Any help would be greatly appreciated.

~Phyx

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Parse error: syntax error, unexpected 'meta' (T_STRING)

Post by Albert Wiersch » Tue Feb 16, 2016 9:59 pm

Hello,

Maybe it should be this (please check your single and double quotes)?

Code: Select all

<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'Pretty' ) . '</span>', '', '</span><span class="meta-sep">|</span>' ) ?>
Image
Albert Wiersch

Phyx
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Tue Feb 16, 2016 8:26 pm

Re: Parse error: syntax error, unexpected 'meta' (T_STRING)

Post by Phyx » Thu Feb 18, 2016 6:26 pm

Thank you so much. The tutorial I was copying from had double quotes, so naturally I did the same.

Thanks for your help!

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Parse error: syntax error, unexpected 'meta' (T_STRING)

Post by Albert Wiersch » Thu Feb 18, 2016 8:04 pm

You're welcome! Glad I could help.
Image
Albert Wiersch

Post Reply