-1
Example: 2h53m23s I’d like it to look like this:02:53:23
Example in my code
<?php
valor_com_letra = "2h53m23s;
aqui a formatacao
echo $valor_com_letra; //resultado 02:53:23
;?>
-1
Example: 2h53m23s I’d like it to look like this:02:53:23
Example in my code
<?php
valor_com_letra = "2h53m23s;
aqui a formatacao
echo $valor_com_letra; //resultado 02:53:23
;?>
4
A simple way is to replace these values
Ex
str_replace('s','', str_replace(['h','m'], ':', $valor_com_letra));
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
Perfect my friend thanks ta !
– Geratec Telecom
I have only one problem srrs when it comes to value : 58m26s I would like it to look like this 00:58:26
– Geratec Telecom
in case it gets like this: 58:26 then don’t enter the system understood
– Geratec Telecom
You can do an IF by checking the amount of characters. If it is 5 after treatment, you add 00: in front
– Everton Muniz