Reza Reza - 7 months ago 30
PHP Question

Do not let the variable display the value

The following code gets automatically executed and displays the value of it:

$date_up = ceil(the_field('jahr') / 10) * 10;

I do NOT want to display it. I only want to save it in a variable.

I already tried to declare it as a string with this code:

$date_up = settype(ceil(the_field('jahr') / 10) * 10, 'string');

But that is not going to work, since the first parameter needs to be a variable. Funny but that is exactly what I want ... just a simple variable that is doing nothing. Any solutions?


The function the_field() is to blame as it probably has an echo statement within it. You need to remove that.