Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End FOR loop with counter in variables Re: FOR loop with counter in variables

#135662
TheDoc
Member

You would do something like this:

$my_var = get_field(‘some_field’);

if( $my_var ) {
echo $my_var;
}

Or, if you want to output the field without checking if it exists or not, you’d go like this:

the_field(‘some_field’);

> Or in words, echo get_field() does the same as the_field()…. Right?

Basically, yea!