Question: good day all ,, I am new learner and trying to make an associative array for jobs which user inputs the id, title and description but it is not correct ,,can u guide me through this ? 

I also want to search for jobs by its title or description and return the job id , 

Thanks alot 

```
<html>
<body>
This form is for storing array of jobs with ID and description for each 
<form method = "post" >
input job iD <input id="jobid"> 
input jobname <input id="jobname"> 
Write a description <input id="jobdesc">  
<input type="submit" value="click to store input" > 
</form>

</body>
</html>

<?php
$jobs_array = array();
$jobs_array[] = array ($_POST['jobid'] ,$_POST['jobname'], $_POST['jobdesc']);
?>

```

Answer: 
Tweaked your markup a bit to

```
<html>
<body>
    <p>This form is for storing array of jobs with ID and description for each </p>
    <form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "post" >
        <p><label for = "jobid">input job iD</label> <input type = "text" name = "jobid" id="jobid"></p>
        <p><label for = "jobname">input jobname</label><input type = "text" name = "jobname" id="jobname"></p>
        <p><label for = "jobdesc">Write a description</label><input type = "text" name = "jobdesc" id="jobdesc">  
        <input type="submit" value="click to store input" > 
    </form>

</body>
</html>

<?php
    $jobs_array = array ($_POST['jobid'] ,$_POST['jobname'], $_POST['jobdesc']);
?>

```

you can access `jobid` with `$jobs_array[0]` now, and so on.
An associative array is one where you have a value in an array which can be accessed by a key - that acts as the index.

In your code, as shown below, you are assigning a value to the array without a key thus it isn't associative. Furthermore, you are adding an array to the array making it multidimensional which is inappropriate in this situation.

```
$jobs_array[] = array ($_POST['jobid'] ,$_POST['jobname'], $_POST['jobdesc']);

```

The code should look like this:

```
$jobs_array = array("job_id" => $_POST['jobid'], "job_name" => $_POST['jobname'], "job_description" => $_POST['jobdesc']);

```

Also, the reason why the $\_POST variables are not set is because you're using `id` rather than `name`. `id` refers to the stylesheet whereas `name` refers to how the data in the field can be accessed.

For the second part of your question, you need to be using a database to store the jobs, and from there, you can run queries whereby you are able to search through the rows by its id, and return an array of results.