If you know of any open source project that does something similar I’d be happy to look at the source code. Example of what I am looking for. You custom build a form that looks similar to
Name:
Address:
Zip Code:
Gender: Male/Female
(Now in this field I would like for the admin to be able to define a logic criteria, If Gender was female then some questions would should up, If male other questions would show up). This would be done dynamically since I would not know what the customer built.
Female Question One: (Logic Syntax that customer would put would be [gender] = 'female')
So How would I go implementing something like that. I would prefer if it is in PHP but other languages would be fine.
Here is a Picture, this would be entered by the user and I would have to parse it.

It sounds like you want to build a survey type tool, where people can create custom forms. If I understand it, you need to build a few pieces to get what you want:
A way for people to specify under what conditions a field appears (which you’ve provided a screenshot of – I assume that’s a sample/mock up).
A standardised language which people can use to specify their conditions.
a parser which will interpret what the user types in, and convert it to some standard representation
a complier which will convert that standard representation into the code which displays/hides questions.
You will also have to make some design decisions, and they will determine things like which languages you can use. For example, if it is sufficient to only show/hide questions when the “next” button is clicked, then you can do it in PHP alone. If you need to dynamically hide questions on the same webpage before clicking next, you will need to use javascript or similar.
For parts 3 and 4, there are some helpful answers in Lexer written in Javascript? (javascript) and What is a good parser generator for php? (php) which might point you in the right direction.