Q:

Use only part of a php variable - is this possible?

Is it possible to create a new variable with only the left X amount of values automatically?
I have a variable being passed to a page, but I need to use this in a query, both the full variable and part of it 
full variable is like this - Day 55
Left of variable - Day
So consequently I would have two variables to use in a query
$var1 = "Day 55";

$var2 = "Day";

Sorry if this is a noob question, I'm new to php

A:

What you want to use is the substring.
$var1 = "Day 55";
$var2 = substr($var1,0,3); // 3 characters of $var1, starting with character 0.

