I’m ever so green with PHP so here’s what i’m trying to do. I have an array
$companyStates = array("AR","TX","LA","OK","GA","NC","SC");
Just a list of US states.I need to do two simple things with this array: 1) print the values of the array in this format: ARTXLAOKGANCSC no spaces just values for use with some javascript i’m using. 2) Then, add to a string variable the number 100 for each item in the array, separated by commas. End result I need two variables with values ARTXLAOKGANCSC and 100,100,100,100,100,100,100
normally, I’d do a for in loop and push to an array and list out the values of the array, but i’m not familiar enough with php syntax to accomplish this.. thanks for the help!
Untested, but I think it should work: