Home » Php » Extract text between two characters

Extract text between two characters

Posted by: admin September 25, 2018 Leave a comment

Questions:

How can I best trim the following text outside the braces:

$myString = "10:0{ "name":"John", "age":30, "car":null }24:0";

The text outside of the braces 10:0 and 24:0 may vary.

Answers: