Skip to content

Instantly share code, notes, and snippets.

@GoodChancer
Created March 20, 2017 21:07
Show Gist options
  • Select an option

  • Save GoodChancer/30c7a332fdbf6b428b88d9b5f42bc041 to your computer and use it in GitHub Desktop.

Select an option

Save GoodChancer/30c7a332fdbf6b428b88d9b5f42bc041 to your computer and use it in GitHub Desktop.
If else null
if ($itunes['resultCount'] != '0') {
$albumItunesURL = $itunes['results'][0]['collectionViewUrl'].'&ls=1&mt=1';
$artistItunesURL = $itunes['results'][0]['artistViewUrl'].'&ls=1&mt=1';
$albumItunesArt = $itunes['results'][0]['artworkUrl100'];
} else {
$albumItunesURL = 'NULL';
$artistItunesURL = 'NULL';
$albumItunesArt = 'NULL';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment