i do have really similar issues as in this topic: Proper way of converting string to long int in PHP
Unfortunately solution there is not working for me.
My situation is following:
I do have Wordpress database with meta_key which value is 700
(in LONGTEXT). I would like to get this number as Integer.
But when I use intval($meta_value)
or even (float) $meta_value
it adds extra zero to at the end and returns 7000
:(
Could someone please help?
EDIT: Screenshots added
here is picture of data in database
here is code that loads this value and converts it
But the site is still returning 7000
Here is original code:
$meta_value = the_author_meta('pocet_bodu', $user_id);
echo $meta_value;
This returns okay 700, but it is not number and it cannot be used for mathematical operations. Once I try to convert it to integer or float, number is 7000.