Hi, I'm a beginner to php coding. Recently I came across a function tag next_post_link, having a format parameter takes value of variable %link. I just don't understand why it's not $link since that's the standard way of naming a php variable. Perhaps there is other meaning of % when it is used in this case. Can anybody tell me what's the difference between % and $ when they are used in front of a php variable?
<?php next_post_link('%link', 'Next post in category', TRUE, '13'); ?>
A percent sign in front a variable...what is that mean?
Moderator: General Moderators
Re: A percent sign in front a variable...what is that mean?
That isn't a variable, it is a string being passed as the parameter (it is wrapped with quotes). You would need to look at the code for the function to see what it does with it.
-Greg
PS: Here is explanation on what it is for WP: http://codex.wordpress.org/Function_Ref ... _post_link
-Greg
PS: Here is explanation on what it is for WP: http://codex.wordpress.org/Function_Ref ... _post_link