print values from a string

hi.
i have 3 varaibles in a string:

char motor_one_pins[]= "dirA1" "dirB1" "pwm1";

i want to print them in one line one by one. so the output will be:

dirA1, dirB1, pwm1

the actual code looks like that:

int motor_one(){
char motor_one_pins[]= "dirA1" "dirB1" "pwm1"

}

and i want the function "motor_one" to return "dirA1, dirB1, pwm1" so the function ahead will get these pins numbers:

void move_forward(int pinA, int pinB, int speed){
wheels_pwm.setPWM(pinA, 0, angleToPulse(0) );
wheels_pwm.setPWM(pinB, 0, angleToPulse(0) );
wheels_pwm.setPWM(pwm1p, 0, angleToPulse(speed) );
}
so when i call her it will look like this:
move_forward(put here the string);
so the final result will be "move_forward(dirA1, dirB1. pwm1);"
is there a way?
i use these 3 vars a lot in my code in the same order and want to do a little shortcut.
thanks!

char motor_one_pins[]= "dirA1" "dirB1" "pwm1";The effect of that definition is the following single string - "dirA1dirB1pwm1"

(you can verify that by printing the string)

char motor_one_pins[]= "dirA1" "dirB1" "pwm1";

What a bizarre way to hold 3 strings

Did you mean them to be in separate array levels ?

How about

char * motor_one_pins[] = {"dirA1" , "dirB1", "pwm1"};
void setup()
{
  Serial.begin(115200);
  while (!Serial);
  for (int x = 0; x < 3; x++)
  {
    Serial.println(motor_one_pins[x]);
  }
}
void loop()
{
}