I am a beginner in programming especially using CodeIgniter Framework. and I have an issue, may be you guys could help me.
Here is the code
<div class="form-group">
<?php
echo form_label('Email', 'email');
echo form_input('email', '', [
'type' => 'email',
'id' => 'email',
'class' => 'form-control'
]);
?>
</div>
when I inspect in browser it shows like this
<input type="text" name="email" value="" id="email" class="form-control">
but when I change the code to this
<div class="form-group">
<?php
echo form_label('Email', 'email');
echo form_input([
'type' => 'email',
'name' => 'email',
'id' => 'email',
'class' => 'form-control'
]);
?>
</div>
the inspect element shows
<input type="email" name="email" value="" id="email" class="form-control">
and I am wondering, why I can't use <input type="email"> with my first code?
Any explanations would be helpful to me, thank you.