Hi i have the following array that comes from a html form
$job_title = 'Developer';
$job_skill = 'html,css,javascript';
$post_fields = array(
'job_title' => $job_title,
'skills' => $job_skill
);
echo "<pre>";
print_r($post_fields);
echo "</pre>";
that gives the output as
Array
(
[job_title] => Developer
[skills] => html,css,javascript
)
I wanted to convert the skills to an array itself so i converted the $post_fields to
$post_fields = array(
'job_title' => $job_title,
'skills' =>
array (
0 => 'html',
1 => 'css',
2 => 'javascript'
)
);
Now in the main code, "$job_skill" is a dynamic value and can have any number of skills. It's value can be null, can have 1 skill, 2 skill or any number of skill. The problem is that i am not able to create array of job_skill for 'n' number of values
Can anyone please help me with it