Skip to content

Instantly share code, notes, and snippets.

@Rezvitsky Rezvitsky/1.php
Created May 15, 2020

Embed
What would you like to do?
1.php
if (!empty($fields['fetch'])) {
$fetch = explode(',', $fields['fetch']);
foreach ($fetch as $key => $value) {
$data[$value] = $value;
if (!empty($data[$value])) {
if (in_array($data[$value], ['photo', 'cover'])) {
if (!empty($get_data['first_name'])) {
$users[$data[$value]] = get_photo_by_id($get_data[$data[$value]])['photo'];
}
if (!empty($get_data['name'])) {
$pages[$data[$value]] = get_photo_by_id($get_data[$data[$value]])['photo'];
}
} else {
if (!empty($get_data['first_name'])) {
$users[$data[$value]] = $get_data[$data[$value]];
}
if (!empty($get_data['name'])) {
$pages[$data[$value]] = $get_data[$data[$value]];
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.