Can't set arguments to a view for displaying all data I use 

$view = views_embed_view('export_emargement','page_1',$journee,$region,$produit);


it works well, but If I don't want to specify $region the view does'nt works.

Im my view admin if I set argument like this 797/62/24 it works

If I try 797/all/24 it works too!every data are displayed

In my code i try this, but it can't be parsed

$args = array($journee.',"all",'.$produit);
or
$args = array($journee.',all,'.$produit);
$view = views_embed_view('export_emargement','page_1',$args);
$args is an array that expects each field's contextual values to be passed in separately.

i think $args = array($journee, "all", $produit); ought to work. 

you should only concatenate arguments into a string if its a multi-value single field situation and then I believe you join with '+' not commas.

EDIT

I missed what you were asking, if you have a contextual filter that is optional inside the view you can configure what happens when no value is provided (pick "display all results").



then when calling the view

as far as skipping an argument 'all' - the easiest way would be to move the order of the contextual filters so that the one that is allowed to be "empty" is last.

then instead of calling

$view = views_embed_view('export_emargement','page_1',$journee,$region,$produit);


call

$view = views_embed_view('export_emargement', 'page_1', $journee, $produit, $region);


or 

$view = views_embed_view('export_emargement', 'page_1', $journee, $produit);


depending on if the user has selected a region