how can i pass the array which have some record fetched from the database from one php page to another desire php page without using session

A) I'm not sure why you don't want to use a session. B) So you're not sending a string too long you could base64encode a json_encoded array and send it through GET.

ie.,

<?php
$some_array = array('blah', 'blah2');
$some_arrayGET = base64_encode(json_encode($some_array));
?>
<a href="somepage?some_array=<?php echo $some_arrayGET ?>">BLAH!</a>

Then on the other side

$some_array = json_decode(base64_decode($_GET['some_array']));

But, as with anything sent over GET (or POST) it can be modified by the user. If you store it in the session it cannot be modified by the user.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.