-3

I tried with the following code but it is not working.Please anyone help me with this.Thanks in advance for your help.

<button class="delete btn btn-warning" value= $row['id'] " " $row['vehicle'] ><i class="icon-trash"></i>Delete</button>
S.Lisy
  • 1
  • 2

3 Answers3

1

Probably you are looking for string concatenation: http://php.net/manual/en/language.operators.string.php

<button class="delete btn btn-warning" value="<?= $row['id'] . " " . 
$row['vehicle'] ?>"><i class="icon-trash"></i>Delete</button>

Hope it helps.

0
<button class="delete btn btn-warning" value='<?php $row['id'] ?>" "<?php $row['vehicle'] ?>'><i class="icon-trash"></i>Delete</button>

if your $row fields are set correctly then this code will work for you

pr1nc3
  • 8,108
  • 3
  • 23
  • 36
0

on of possible way is, use json for parsing data here

<input value="<?php echo json_encode($row); ?>" />

then decode it again by json_decode()

AZinkey
  • 5,209
  • 5
  • 28
  • 46