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:

```
You have missed the check 

```
  def alphaToPhone(alpha):
        for i in alpha:
            if i == "b" or i == "k" or i == "c":
                phone="yes"
            else:
                phone="no"
        return phone

  print(alphaToPhone("23ht"))

```