I am not a programmer im just trying to do this to make my life at work easier when it comes to create a new account, I havent tested it yet because i want to sort out the fact that it uses the same password for the db and the cpanel account, so ive inserted a little password generator script inside that file (the bold part), this is what i have:

You would want to replace $xmlapi->cliargs['pass'] not just ['pass'] - the stuff between the brackets is a command line interfae (CLI) parameter. Since $password is a variable rather than a command line parameter, you would replace the entirety of that "variable."

To recap, a CLI parameter is something like this:

myscript.php user=bob pass=~sup3rsecur3!!

Everything after the .php is a parameter. In this case, the parameters are named user and pass respectively.