I am trying to get my query to take the values from my array_push, but can't get it working, unless of course the array is hard coded.
The array comes from a previous query
I'm new to using array_push so would value any input into how best I do this.
$pages = json_encode($pages);
$pages = json_decode($pages, true);
$get_ids = array();
array_push($get_ids, $pages[0]["id"]);
$get_ids = array(10); // hardcoded
$getpages = DB::table('pages')
->whereIn('id', $get_ids)
->select('id', 'title')
->get();
array from var_dump gives me
array(1) { [0]=> string(2) "10" }
JSON from very first query
[{"id":"10","title":"About us"}]