Conditionally set post_content in wp_insert_post

I can’t help but think I am missing something but what seems like the obvious answer is to alter your $create_pages array:

$create_pages = array(
  'one' => 'content for one',
  'two' => 'content for two',
  'three' => 'content for three'
);

foreach ($create_pages as $title => $content) {
    $add_pages = array(
        'post_title' => $title,
        'post_content' => $content, // lets say, if the page_title is 'Home', set the post_content to 'Default home page content'
        'post_status' => 'publish',
        'post_type' => 'page'
    );
    var_dump($add_pages); // debugging
//     $page_id = wp_insert_post($add_pages); 
}

It is possible to use a second array of post content and match it against the titles but based on your description of the problem, I can’t see why you’d need that complexity.

Another option would be to use nested arrays, something like this:

$create_pages = array(
  array (
    'title' => 'one', 
    'content' => 'content for one'
  ),
  array (
    'title' => 'two', 
    'content' => 'content for two'
  ),
  array (
    'title' => 'three', 
    'content' => 'content for three'
  ),
);

foreach ($create_pages as $page) {
    $add_pages = array(
        'post_title' => $page['title'],
        'post_content' => $page['content'], // lets say, if the page_title is 'Home', set the post_content to 'Default home page content'
        'post_status' => 'publish',
        'post_type' => 'page'
    );
    var_dump($add_pages);
//     $page_id = wp_insert_post($add_pages);
}

I am fairly sure that either version should work fine ( see this and this), though the latter is probably going to be more readable if you have long titles.

If that array is oppressively large, you could put it in another file and include it.