J
J
Jony13372016-06-29 23:38:30
PHP
Jony1337, 2016-06-29 23:38:30

How to split a string into 3 parts and make numbers from it in php?

Hello
Let's say I get a string in the form "1990-03-02"
This is how you see the date, but how can I divide this date into 3 parts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Александр Сисюкин, 2016-06-29
@Jony1337

$res = explode ('-', ваша строка)
Var_dump ($res);
И если не числа то приведи их спомощью (int)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question