Posts by Alison Silva • 1 point
2 posts
-
0
votes4
answers111
viewsA: Get content between tags [x] and [/x] with Regular Expression
You can use the following code that will return either to [en] or to [en-us], or any other type of value between square Brackets. $re = '/\[[^]]+\]([^[]+)\[\/[^]]+\]/is'; $str = '[pt-br] Qual é…
-
0
votes2
answers461
viewsA: How to recover the `mysqli->insert_id`from within this function, in addition to the query return?
Change the return of your method to return an array. public function executar($sql){ $con = new conexao(); $con->abrir(); $re = $con->mysqli->query($sql); // Preciso retornar esta…