so tonight i was trying to create a function that will check if a credit card is valid or not. However i'm stuck here. In my calcul, i get number such as 10, 56, 30... number with 2 numbers.
(I mean, 1 is a number with 1 number just like 2, 3, 4 ,5 6, 7 , 8 ,9.. number with two numbers would be 10 ans higher.)
What I need to do is :
- Get the first number and add it to a new variable, and do the same thing with another variable.
Example:
I have this number -> 23
I need to :
$var1 = 2;
$var2 = 3;
I wanted to use the function subtr, but it looks like it doesn't works with numbers ..
Thanks for reading !!