How to get specific string/value from an array? php

Question

I am creating a custom wordpress theme and i am little stuck in one situation. I created an array $ark and get some values in it

<?php  $ark[] = esc_url( add_query_arg( 'pdff', $post->ID ) );  print_r($ark) ; echo 'jonty'; ?>

here below is the output of the above code;

Array ( [0] => /jobifylocal/wp-admin/admin-ajax.php?pdff=127 ) jonty

what i want is that the only value of pdff after equals-to like here 127 i only need 127 in a $variable to echo somewhere else.

0
, , , , Almight Hacker 1 year 2020-08-31T01:10:43-05:00 0 Answers 54 views 0

Leave an answer

Browse
Browse