I know this is a very silly question but im new to vuejs and i would like to know how to convert this simple php code to vuejs
<div>
<?php
foreach( $array as $key => $value){
if($key == 0){
echo '<div>'.$key.'</div>';
}else{
echo '<div>'.$value.'</div>';
}
}
?>
<div>
it should go something like this :
<div>
<div v-for="(item, key) in items" v-if="key == 0">{{key}}</div>
<div v-else>{{item}}</div>
</div>
<div v-for="(item, key) in items"><div v-if="key == 0">{{key}}</div> <div v-else>{{item}}</div></div>