This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
<input type="text" name="reading_paper_marks[1]"> | |
<input type="text" name="reading_paper_marks[2]"> | |
<input type="text" name="reading_paper_marks[3]"> | |
--> | |
<script> | |
$( "input[name='reading_paper_marks[1]']" ).val(2); | |
</script> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#01 - array_key_first | |
$myArr = ['name'=> 'sachin', 'phone' => '1234']; | |
echo array_key_first($myArr); // name | |
echo $myArr[array_key_first($myArr)]; // sachin | |
#02 - array_key_last | |
$myArr = ['name'=> 'sachin', 'phone' => '1234']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The date | |
$plain_date = '2022-09-21 09:00:00'; | |
// Prepare the timezones | |
$datetime_TO = new DateTimeZone('Asia/Kolkata'); // TO // India (+05:30) = +0530 = Asia/Kolkata | |
$datetime_FROM = new DateTimeZone('Asia/Singapore'); // FROM // Singapore (+08:00) = +0800 Asia/Singapore | |
//OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<input type="date" name="meeting_date" value="<?= isset($_GET['meeting_date']) ? $_GET['meeting_date'] : '' ?>"> | |
<br><br> | |
<input type="time" name="meeting_time" value="<?= isset($_GET['meeting_time']) ? $_GET['meeting_time'] : '' ?>"> | |
<br><br> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Think Client, Enter Think Client, Ashish Bali | |
https://drive.google.com/drive/folders/1ibOszWmn4hJuN3ux27GdAnA73ViAaCEp?usp=sharing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Development NOTES */ | |
1. Every Table has prefix with vt_ (vt_users, vt_settings.....) | |
2. Model m updated event call hone pr table m updated_at m current epoch time save ho jaye | |
3. Model m created event call hone pr table m created_at m current epoch time save ho jaye. | |
/* | |
Name route connect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#Route | |
$routes->post( 'is-auth', 'Home::loginAuthCheck', ['as' => 'ajax.is-auth'] ); | |
#Controller | |
public function loginAuthCheck() | |
{ | |
$Login = 'no'; | |
if ( empty( session()->get( 'last_login_token' ) ) ) { | |
$Login = 'no'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function fixForUri($string){ | |
$slug = trim($string); // trim the string | |
$slug= preg_replace('/[^a-zA-Z0-9 -]/','',$slug ); // only take alphanumerical characters, but keep the spaces and dashes too... | |
$slug= str_replace(' ','-', $slug); // replace spaces by dashes | |
$slug= strtolower($slug); // make it lowercase | |
$slug = preg_replace('/-+/', '-', $slug); // replace ---- to - | |
return $slug; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- dynamically set the selected option of a drop-down list using jQuery, JavaScript and HTML --> | |
<script> | |
// Dynamically Select User Current Time Zone | |
$(function(){ | |
let mtz = Intl.DateTimeFormat().resolvedOptions().timeZone; | |
$("#schedule_meeting_timezone").val(mtz).attr("selected","selected"); |