Skip to content

Instantly share code, notes, and snippets.

@prateeksachan
Last active December 18, 2015 15:59
Show Gist options
  • Save prateeksachan/5808629 to your computer and use it in GitHub Desktop.
Save prateeksachan/5808629 to your computer and use it in GitHub Desktop.
$s = '';
$s.= '<add>';
for ($id = 1; $id <=1000; $id++){
$s.= '<doc>';
$s.= '<field name="id">' . $id . '</field>';
$s.= '<field name="courseid" update="set">2</field>';
$s.= '</doc>';
}
$s.= '</add>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment