Question: I did not want to do it using "shell, exec, etc"... Only with loop in php!

My understanding is in this case:

1. I have a form in page, on form submit, i will call on a PHP script which will run in Background.
2. Background process started and running ....running ....running .....running......
3. I want to got back process id with which Process id Background process started and previous background process running ....running ....running .....running ..........

**I need to do this, and if possible a file where it executes a single code with loop until finish some line**

***Idea to project structure:***
[click here](https://i.stack.imgur.com/5SJKP.jpg)

Answer: 
Because non-empty strings evaluate to `True` in Python. Solution for you problem could be one of the following

```
if i=="b" or i == "k" or i == "c":

```

or

```
if i in ["b", "k", "c"]:

```

Apart from that you are iterating over a wrong set of values. Replace your `for` with

```
for i in alpha:

```
Your condition `i=="b" or "k" or "c"` probably isn't what you wanted. It always returns true, because `"k"` (and `"c"` as well) is true. What you want is:

```
if i=="b" or i=="k" or i=="c":

```

or, better:

```
if i in {"b", "c", "k"}:

```