can anyone offer some help on this matter
i have 5 session arrays and i want to merge all of them. however these session arrays are take from several multiple select list. while the code that i have done so far works fine, it has one small problem. in the event that some one does not uses one of the list thus one of the sessions arrays will be empty thus the merge of the other arrays will not take place can anyone offer some ideas on how to solve this problem
here is the code that i have done thus far

$new=array_merge($_SESSION['y1sem1'],$_SESSION['y2sem1'],$_SESSION['y3sem1']);

					print_r($new);

thanks

Recommended Answers

All 3 Replies

if (isset($_SESSION['y1sem1']))
	$new=array_merge($_SESSION['y1sem1']);
	
if (isset($_SESSION['y2sem1']) && isset($new))
	$new=array_merge($new,$d_SESSION['y2sem1']);
elseif (isset($_SESSION['y2sem1']) && !isset($new))
	$new=array_merge($_SESSION['y2sem1']);

if (isset($_SESSION['y3sem1']) && isset($new))
	$new=array_merge($new,$_SESSION['y3sem1']);
elseif (isset($_SESSION['y3sem1']) && !isset($new))
	$new=array_merge($_SESSION['y3sem1']);

how can open uploaded resume in php

Hi brijendra1,

Please start a new thread to post your questions.

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.