Answer the question
In order to leave comments, you need to log in
How to parse part of a text?
There is a text, tell me how to parse only part of it?
1. text bla bla bla , Moscow
How to parse text up to a comma and cut off the rest?
2. text bla bla bla 2017-06-13
How to parse only the date and display it?
Tell me how to do this in php, what commands can I use str_replace, date_parse_from_format?
Answer the question
In order to leave comments, you need to log in
1) preg_match_all("/.*?\,/", $variable(где лежит нужный текст), $variable(куда будет вложен текст) );
2) preg_match_all("/\d\d\d\d\-\d\d\-\d\d/", $variable(где лежит нужный текст), $variable(куда будет вложен текст) );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question