Skip to content

Instantly share code, notes, and snippets.

@cyberdev
Created May 1, 2024 15:12
Show Gist options
  • Save cyberdev/8542a423898e4bd83da2222519998b4f to your computer and use it in GitHub Desktop.
Save cyberdev/8542a423898e4bd83da2222519998b4f to your computer and use it in GitHub Desktop.
PHP Utility Function Trick
$arr_str = array_map('trim', explode(',', $test_str)); //explode an array separated by coma and trim them
$arr_str = array_map(fn ($img) =>$img['url'], $detail['pics']); //get deep array that have url key from pics array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment