I have a HTML table where user can choose products from MySql db.
I have a "add new row" possibility where new row is added to DOM.
Once I add new row, select-2 is no longer functioning in this new row - I beleive it is a problem, that it is searching for input only in first example of select-2 dropdown. How can I show dropdown for each instance?
Code:
<table id="add_new" style="width: 100%; margin-top:40px;" class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12">
<thead>
<tr>
<th style="text-align:left; font-size: 10px; color:#8f8f8f; padding-bottom: 15px; width: 10%;">
Zap. št.: </th>
<th style="text-align:left; font-size: 10px; color:#8f8f8f; padding-bottom: 15px; width: 50%;">
Naziv artikla </th>
<th style="text-align:left; font-size: 10px; color:#8f8f8f; padding-bottom: 15px; width: 20%;">
Količina </th>
<th style="text-align:right; font-size: 10px; color:#8f8f8f; padding-bottom: 15px; width: 20%;">
EM (kos/m/colli,...) </th>
</tr>
</thead>
<tbody>
<tr id="mainsection">
<td> <p href="#" id="count" style="font-size: 13px; text-decoration: none; line-height: 1; color:#909090; margin-top:0px; margin-bottom:0;">
1</p> </td>
<td contenteditable style="padding-top:0px; padding-bottom:5px;">
<h4 style="font-size: 16px; line-height: 1; margin-bottom:0; color:#303030; font-weight:500; margin-top: 10px;">
<select class="form-control select2-multiple" id="dd_artikli" data-width="100%">
<option value="">Select country</option>
<?php
if (count($itemRecords_artikli) > 0) {
foreach ($itemRecords_artikli as $ct) {
?>
<option value="<?php echo $ct['id']; ?>">
<?php echo $ct['name']; ?>
</option>
<?php
}
}
?>
</select>
</h4>
</td>
<td contenteditable> <p href="#" style="font-size: 13px; text-decoration: none; line-height: 1; color:#909090; margin-top:0px; margin-bottom:0;"> </p> </td>
<td contenteditable style="padding-top:0px; padding-bottom:0; text-align: right;"> <p style="font-size: 13px; line-height: 1; color:#303030; margin-bottom:0; margin-top:0; vertical-align:top; white-space:nowrap;"> </p> </td>
</tr>
</tbody>
</table>
<script>
var number = 1;
document.getElementById("newsectionbtn").onclick = function() {
var container = document.getElementById("add_new");
var section = document.getElementById("mainsection");
var count = document.getElementById('count');
number++;
count.textContent = number.toString();
container.appendChild(section.cloneNode(true));
}
</script>
<
?php
/*
#Author: Sanjay Kumar
#Project: PHP MySQLi How To Use Select2 for Multiple Select Tutorial
#Email: onlinewebtutorhub#gmail.com
#Website: https://onlinewebtutorblog.com/
*/
// Include the database configuration file
require 'dbconfig.php';
$countrySelect = $conn->prepare("SELECT * FROM artikli");
$countrySelect->execute();
$countries = $countrySelect->get_result();
$itemRecords_artikli = array();
while ($item = $countries->fetch_assoc()) {
extract($item);
$itemDetails = array(
"id" => $id,
"name" => $naziv
);
array_push($itemRecords_artikli, $itemDetails);
}
?>
After drop-down bind run this command.
jQuery('#dd_artikli').select2();
Or use the jquery ready function.
$(document).ready(function() { jQuery('#dd_artikli').select2(); });
I need to add product image to my html email template that is custom build by me.
I can not able to find any hook that will add product image to my html email template with below shared code
I'd appreciate it if you helped.
<table style="width: 70%" >
<tr>
<th style="font-weight: normal; width: 24%" >
<p style="margin-left: 30px;">Produkt Artikel :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo $product_name; ?>
</div>
</th>
</tr>
</table>
<table style="width: 70%">
<tr>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Produktdetail :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; width: 50%;">
<?php wc_display_item_meta($item, array('label_before' =>esc_attr( $text_align), ) ); ?>
</div>
</th>
</tr>
</table>
<table style="width: 70%" >
<tr>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Vorname : </p>
</th>
<th style="width: 30%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo wp_kses_post( wptexturize( $order->get_billing_first_name() ) ); ?>
</div>
</th>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Nachname :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo wp_kses_post( wptexturize( $order->get_billing_last_name() ) ); ?>
</div>
</th>
</tr>
</table>
so im trying to print a pdf with table inside is something like an invoice using HTML/CSS and im calling the data using laravel php. so what i trying to achieve as in this
but until now what i can do is like this
as you can see the table is not displaying where it should be but instead skipping the whole first page and starting on the next page. i need it to print on the first page. how can i do that? my code as below
<style>
* {
margin:0;
padding:0;
font-family: 'Muli' !important;
}
html{
font-family: 'Muli' !important;
padding: 0;
}
body{
padding: 20px;
background-color: #fff;
}
header{
width: 100%;
border-bottom: 1px solid #1f1f1f;
position: fixed;
height: 80px;
padding: 20px 20px 0px;
margin-bottom: 0px;
}
header .address{
width: 50%;
display: inline-block;
vertical-align: middle;
}
header .address p{
color: #6a6a6a;
font-size: 12px;
margin: 0px;
padding: 0px;
padding-top: 20px;
}
header .logo{
width: 49%;
display: inline-block;
vertical-align: top;
}
header .logo img{
padding-top: 10px;
float: right;
height: 50%;
}
.pagenum:before { content: counter(page); }
footer{
position: fixed;
bottom:80px;
}
footer p{
text-align:right;
padding: 15px;
color: #6a6a6a;
font-size: 10px;
}
.details{
margin-top: 100px;
margin-bottom: 10px;
font-size: 12px;
color: #1f1f1f;
}
.new-section{
margin-top: 10px;
margin-bottom: 10px;
font-size: 12px;
color: #1f1f1f;
}
.new-section .title {
font-weight: 500;
text-transform: uppercase;
margin-top: 20px;
padding: 8px 10px 10px 20px;
background-color: #5b5b5b;
color: #fff;
}
.new-section .details {
margin-top: 10px;
}
table{
width: 100%;
}
table thead tr th{
padding: 15px;
font-size: 14px;
font-weight: lighter;
}
table thead tr th:last-child{
text-align: right;
}
table tr td{
padding: 15px;
vertical-align: top;
border-top: 1px solid #b9b9b9;
}
table tr td:last-child{
text-align: right;
}
table tr:last-child td{
border-bottom: 1px solid #b9b9b9;
}
table tr td .receipt-image{
width: 100%;
height: 150px;
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
}
table tr.detail-section td {
border: none;
padding-top: 8px;
padding-bottom: 8px;
}
table thead tr th{
padding-top: 120px;
}
</style>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Expense Report as of {{date('Ymd:His')}}</title>
<link href="https://fonts.googleapis.com/css?family=Muli:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
</head>
<?php
$total_amount = 0;
$total_reimubursable = 0;
$currency = '';
// $path = public_path(preg_replace('/public/', '', $company->company_logo));
$path = public_path('/uploads/header.jpg');
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/'.$type.';base64,'.base64_encode($data);
?>
<body>
<header>
<div class="address">
<p>{{nl2br($company->company_address)}}</p>
{{-- <p>Digi Telecommunications Sdn Bhd</p>
<p>Lot 10, Jalan Delima 1/1</p>
<p>40000 Shah Alam, Selangor, Malaysia</p> --}}
</div>
<div class="logo">
<img src="{{$base64}}" alt="alt.expense">
</div>
</header>
<footer>
<p>Generated by alt.hr on {{date('d/m/Y') }} <br>
Page: <span class="pagenum"></span></p>
{{-- <p>Email: support#alt.hr</p> --}}
</footer>
<div class="details">
<p>Name: {{$user->name}}</p>
<p>Employee ID: {{$user->employee_id}}</p>
<p>Statement Period: {{\Carbon\Carbon::parse($fromDate)->format('d-M-Y')}} until {{\Carbon\Carbon::parse($toDate)->format('d-M-Y')}}</p>
<p>Report Type: Self</p>
</div>
#foreach($expenses as $expense)
<?php
$total_amount += $expense->total_amount;
$currency = $expense->currency ? : $expense->type->currency;
?>
#endforeach
<div class="new-section">
<div class="title">
Expense Claims Summary
</div>
<div class="details">
<p>Total Claims : {{count($expenses)}}</p>
<p>Total Claim Amount: {{$currency}} {{$total_amount}}</p>
</div>
</div>
<div class="new-section" >
<div class="title">
Transactions
</div>
<div class="details">
<table cellpadding="0" cellspacing="0" style="page-break-before : always;">
<thead>
<tr>
<th>Transaction ID</th>
#if($dateFilter == 'invoice_date')
<th>Submitted Date</th>
#elseif($dateFilter == 'submitted_at')
<th>Invoice Date</th>
#else
<th>Submitted Date</th>
<th>Invoice Date</th>
<th>Reviewed Date</th>
#endif
<th>Expense Type</th>
<th>GST Amount({{$currency}})</th>
<th>Total({{$currency}})</th>
</tr>
</thead>
<tbody>
#foreach($expenses as $expense)
<tr style="background-color: #efeff0;">
<td>{{$expense->ref_no}}</td>
#if($dateFilter == 'invoice_date')
<td>{{$expense->submitted_at ? $expense->submitted_at : ''}}</td>
#elseif($dateFilter == 'submitted_at')
<td>{{$expense->invoice_date ? $expense->invoice_date->format('d-M-Y') : ''}}</td>
#else
<td>{{$expense->submitted_at ? $expense->submitted_at : ''}}</td>
<td>{{$expense->invoice_date ? $expense->invoice_date->format('d-M-Y') : ''}}</td>
<td>{{$expense->approver->last()->pivot->updated_at->format('d-M-Y')}}</td>
#endif
<td>{{$expense->title}}</td>
{{-- <td>{{$expense->user->name}}</td> --}}
<td>{{number_format($expense->gst, 2, '.', '')}}</td>
<td>{{$expense->total_amount}}</td>
</tr>
#if($expense->mileage_amount != '0.00' || $expense->toll_amount != '0.00' || $expense->parking_amount != '0.00')
<tr class="detail-section">
<td>Description</td>
<td>{{$expense->description}}</td>
<td colspan="2"> </td>
</tr>
#endif
#if($expense->mileage_amount != '0.00')
<tr class="detail-section">
<td>Mileage Total</td>
<td>{{$currency}}{{$expense->mileage_amount}} ({{$expense->distance}}{{$expense->type->unit}})</td>
<td colspan="2"> </td>
</tr>
#endif
#if($expense->toll_amount != '0.00')
<tr class="detail-section">
<td>Toll</td>
<td>{{$currency}} {{$expense->toll_amount}}</td>
<td colspan="2"> </td>
</tr>
#endif
#if($expense->parking_amount != '0.00')
<tr class="detail-section">
<td>Parking</td>
<td>{{$currency}} {{$expense->parking_amount}}</td>
<td colspan="2"> </td>
</tr>
#endif
#if($expense->travel_id)
<tr class="detail-section">
<td>Description</td>
<td>{{$expense->travel->description}}</td>
<td colspan="2"> </td>
</tr>
<tr class="detail-section">
<td>Tagged TR</td>
<td>
#foreach($expense->travel->travel_data as $leg)
#if($leg->removed)
#continue
#endif
{{$leg->title}} <br>
#endforeach
</td>
<td colspan="2"> </td>
</tr>
#endif
#endforeach
</tbody>
</table>
</div>
</div>
</body>
</html>
I want to retrieve all media in left side and if media contain data will fill those data.
Here is my view:
<tbody>
<?php $i= 0; ?>
#foreach($print as $get)
#if(count($get->media_id)>0 && $get->Status === "Approved")
<tr>
<?php $i++; ?>
<td style="font-size: 16px; width: 25px; "><?php echo $i; ?></td>
<td style="font-size: 16px; width: 30px">{{$get->media_name}}</td>
<td style="font-size: 16px; width: 98px">{{$get->Date_Occured}}</td>
<td style="font-size: 16px; width: 80px">{{$get->Page_Number}}</td>
<td style="font-size: 16px; width: 150px">{{$get->Content_title}}</td>
<td style="font-size: 16px; width: 470px">{!! nl2br(e($get->Content_Description)) !!}</td>
</tr>
#endif
#endforeach
#foreach($media as $medias )
<?php $i++; ?>
<tr>
<td style="font-size: 16px; width: 25px; "><?php echo $i; ?></td>
<td style="font-size: 16px; width: 30px">{{$medias['media_name']}}</td>
<td style="font-size: 16px; width: 98px"></td>
<td style="font-size: 16px; width: 80px"></td>
<td style="font-size: 16px; width: 150px"></td>
<td style="font-size: 16px; width: 470px">Hakuna Taarifa kwa Leo</td>
</tr>
#endforeach
</tbody>
Here is my controller:
public function printpreview() {
$print = DB::table('media')
->leftjoin('content_forms', 'media.id', "=", 'content_forms.media_id')
->select('media.*','content_forms.*')
->whereDate('content_forms.created_at', DB::raw('CURDATE()'))
->get();
$media = media::all()->toArray();
return view('pdf.printview', compact('print', 'media'));
}
How to send bulk email by clicking button at one time using codeigniter...I got an error while doing bulk email in codeigniter.I need to rectify this one..i need help for this problem
This is my controller
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Send_all extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->helper('url');
$this->load->database();
$this->load->library(array('session', 'form_validation'));
$this->load->model('user_model');
$this->load->model('Gst_model');
$this->load->model('Report_model');
}
public function index($email_cript, $vendor_id)
{
$VendorEmail = base64_decode($email_cript);
$this->db->where('VendorEmail', $VendorEmail);
$query=$this->db->get('gst_vendormaster');
$cust_details= $query->result();
$data['cust_details'] = $cust_details;
//$mail_to = "$VendorEmail";
//$mail_count= count($mail_to);
$to_mail = explode(',', $VendorEmail);
$mail_count= count($to_mail);
for($VendorEmail=0;$VendorEmail < $mail_count;$VendorEmail++)
{
$data['VendorEmail'] = $cust_details[0]->VendorEmail;
print_r($VendorEmail);
$config = array(
'protocol' => 'sendmail',
'mailtype' => 'html',
'charset' => 'UTF-8',
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->set_mailtype("html");
$mail_id = TRIM($to_mail[$VendorEmail]);
$message =
'<p> </p>
<table class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;" border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f6f6f6">
<tbody>
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 13.3333px;"> </span></span></td>
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; margin: 0 auto !important; max-width: 580px; padding: 10px; width: 580px;" valign="top" width="580">
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; box-shadow: 0px 2px 18px 0px rgba(0,0,0,2); width: 100%; background: #fff; border-radius: 3px;" border="0" width="100%">
<tbody>
<tr>
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;" valign="top">
<table style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">
<p><img src="http://www.miisky.com/ci/GST.png" alt="" width="85" height="84" /> <strong>GST - IMPLEMENTATION <img src="http://www.aarmsvaluechain.com/images/value-chain.png" alt="" width="98" height="84" /> </strong></p>
<p>Dear Sir / Madam,</p>
<p>As you are aware, the Government of India introduced Good and Service Tax (“GST”) in August, 2016 which will subsume the existing indirect taxes in India such as value added tax (“VAT”), service tax, central excise, entertainment tax, entry tax etc.. </p>
<p>As part of the GST regime, various state governments have initiated the GST enrolment process of existing VAT taxpayer registered with various State VAT departments. Accordingly, we would request you to confirm if you have completed the enrolment process and obtained the provisional ID from relevant State VAT department. In the event, the enrolment process is yet to commence in State in which you are registered as a VAT taxpayer, we would request you to confirm the receipt of the provisional ID at the earliest possible.</p>
<p>The process of enrolment and obtaining provisional IDs from State VAT department is provided on http://tutorial.gst.gov.in/video/module/index.html. </p>
<p>We have already have got the Provisional Registration Certificate and details of the same is provided below.</p>
<!--Left off format-->
<table cellpadding="5px" align="center" border="4">
<tbody>
<tr><th>Name of the Assesse</th><th>Provisional ID</th></tr>
<tr>
<td>Emerson Process Management Chennai Private Limited</td>
<td>33AAACF0483F1Z3</td>
</tr>
</tbody>
</table>
<p>We would also request you to identify and ascertain the HSN (Harmonized System of Nomenclature) number of the products supplied to us under the Agreement. Under the model GST laws, HSN code of the product must be mentioned in the invoice issued by you..</p>
<p>Separately, with the introduction of GST and model GST laws, the existing agreement needs be amended to incorporate for fresh/ revised covenants and obligations considering GST laws, and regarding revised commercials, as the parties may mutually decide. Accordingly, discussions in this regard would be initiated in due course.</p>
<p>We request you to provide your Provisional id details as per the below format:</p>
<table style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;" border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #00ff99; border-radius: 0px; text-align: center;" align="center" valign="top" bgcolor="#00ff99"><a style="display: inline-block; color: #ffffff; width: 500px; background-color: #00ff99; border: solid 1px #00ff99; border-radius: 5px; box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.5); box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #00ff99;" title="GSTN Number Updation" href="http://www.miisky.com/ci/index.php/Customerlink/vendorRecive/'.$vendor_id.'"><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Click to view the GSTN Updation form</span></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>We hereby authorize M/S. Arms Value Chain Private Limited to collect and consolidate GST Registration details and request you to please share the details to them.</p>
<p>We look forward to your full support in smooth transition to the GST regime.</p>
<br />
<p>Best Regards,</p>
<p>S Hariharan <br /> Emerson Process Management Chennai Pvt. Ltd | 147, Rajiv Gandhi Salai (OMR) | Karapakkam Village | Chennai | 600097 | INDIA <br /> T +91 44 4903 4373 | F +91 44 4903 4400 <br /> hariharan.s#Emerson.com
<p>CIN:U93090TN 1985 PTC 024245</p>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<div class="footer" style="clear: both; padding-top: 10px; text-align: center; width: 100%;">
<table style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-top: 10px; padding-bottom: 10px; font-size: 12px; color: #999999; text-align: center;" align="center" valign="top"><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 13.3333px;"><span class="apple-link" style="color: #000000; font-size: 12px; text-align: center;"><strong>Powered by:AARMS value chain pvt ltd</strong></span> <br /><br /></span></span></td>
</tr>
<tr>
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-top: 10px; padding-bottom: 10px; font-size: 12px; color: #999999; text-align: center;" align="center" valign="top"><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 13.3333px;"> </span></span></td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 13.3333px;"> </span></span></p>
<div> </div>';
$from_mail = 'your#vendor.com';
$from_name = 'GST-MIISKY';
$reply_to = 'innovations#miisky.com';
$subject = "Online GSTIN Updation!";
//$file_name = $datamail['varafile'];
//$path = realpath('uploads/abstract');
// Read the file content
//$file = $path . '/' . $file_name;
$this->load->library('email', $config);
$this->email->from($from_mail, $from_name);
$this->email->to($mail_id);
$this->email->cc('innovations#miisky.com');
$this->email->subject($subject);
$this->email->message($message);
//$this->email->attach($file);
}
if ($this->email->send()) {
$this->session->set_flashdata('msg','<div class="alert alert-success text-center">Mail Succesfully Sent!</div>');
redirect('Vendor_retrieve');
}
}
}
This is my view page
<?php $firm_name = $this->session->userdata('firm_name');
if(!isset($firm_name)){ redirect ('Welcome');}
?>
<link href="<?php echo base_url("assets/css/radiostyle.css"); ?>" rel="stylesheet">
<head>
<style type="text/css">
#import url("http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css");
/*
FORM STYLING
*/
#fileselector {
margin: 10px;
}
#upload-file-selector {
display:none;
}
.margin-correction {
margin-right: 10px;
}
.page-heading {
border-top: 0;
padding: 0px 10px 10px 10px;
}
input, button, select, textarea{
margin: 10px;
}
.ibox-content {
background-color: #ffffff;
color: inherit;
padding: 15px 20px 20px 20px;
border-color: #e7eaec;
border-image: none;
border-style: none;
border-width: 1px 0px;
}
.filterable {
margin-top: 10px;
}
.filterable .panel-heading .pull-right {
margin-top: -20px;
}
.filterable .filters input[disabled] {
background-color: transparent;
border: none;
cursor: auto;
box-shadow: none;
padding: 0;
height: auto;
}
.filterable .filters input[disabled]::-webkit-input-placeholder {
color: #333;
}
.filterable .filters input[disabled]::-moz-placeholder {
color: #333;
}
.filterable .filters input[disabled]:-ms-input-placeholder {
color: #333;
}
.form-control, .single-line {
width: 90%;
}
.btn-group-xs>.btn, .btn-xs {
padding: 0px 15px;
line-height: 1;
}
.btn {
border-radius: 3px;
}
.btn-info {
background-color: #ffffff;
border-color: #ffffff;
color: #191717;
font-weight: bolder;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}
</style>
</head>
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-12 text-center">
<h1>GST - Vendor</h1>
</div>
</div>
<br><div style="text-align: center;">
<label class="control control--radio">Vendor
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Vendor_retrieve';" name="radio1" checked="checked" />
<div class="control__indicator"></div>
</label>
<label class="control control--radio">Customer
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Customer_retrieve';" name="radio2" />
<div class="control__indicator"></div>
</label>
<label class="control control--radio">Product
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Product_retrieve';" name="radio3" />
<div class="control__indicator"></div>
</label>
<label class="control control--radio">Item
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Item_retrieve';" name="radio4" />
<div class="control__indicator"></div>
</label>
<label class="control control--radio">Rate
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Category_retrieve';" name="radio5" />
<div class="control__indicator"></div>
</label>
<label class="control control--radio">Location
<input type="radio" onclick="document.location='<?php echo base_url(); ?>index.php/Vendorlocation';" name="radio6" />
<div class="control__indicator"></div>
</label>
</div>
<div class="fh-breadcrumb">
<div class="full-height">
<div class="full-height-scroll white-bg border-left">
<?php echo $this->session->flashdata('msg'); ?>
<?php echo $this->session->flashdata('message'); ?>
<div class="element-detail-box">
<div class="table-responsive">
<table class='table table-bordered'>
<thead>
<tr>
<th> # </th>
<th> VendorID </th>
<th> VendorCode </th>
<th> VendorName </th>
<th> VendorEmail </th>
<th> VendorMobile </th>
<th> VendorAddress </th>
<th> Department </th>
<th> Division </th>
<th> State </th>
<th> City </th>
<th> CST_NO </th>
<th> TIN_NO </th>
<th> VAT_NO </th>
<th> SGST_NO </th>
<th> CGST_NO </th>
<th> IGST_NO </th>
<th> MSME_RegNO </th>
<th> MSME_Category </th>
<th> Send Mail</th>
<th> Edit </th>
<th> Delete </th>
</thead>
<tbody>
<?php for ($i = 0; $i < count($catlist); ++$i) { ?>
<tr>
<td><?php echo ($i+1); ?></td>
<td><?php echo $catlist[$i]->VendorID; ?></td>
<td><?php echo $catlist[$i]->VendorCode; ?></td>
<td><?php echo $catlist[$i]->VendorName; ?></td>
<td><?php echo $catlist[$i]->VendorEmail; ?></td>
<td><?php echo $catlist[$i]->VendorMobile; ?></td>
<td><?php echo $catlist[$i]->VendorAddress; ?></td>
<td><?php echo $catlist[$i]->Department; ?></td>
<td><?php echo $catlist[$i]->Division; ?></td>
<td><?php echo $catlist[$i]->State; ?></td>
<td><?php echo $catlist[$i]->City; ?></td>
<td><?php echo $catlist[$i]->CST_NO; ?></td>
<td><?php echo $catlist[$i]->TIN_NO; ?></td>
<td><?php echo $catlist[$i]->VAT_NO; ?></td>
<td><?php echo $catlist[$i]->SGST_NO; ?></td>
<td><?php echo $catlist[$i]->CGST_NO; ?></td>
<td><?php echo $catlist[$i]->IGST_NO; ?></td>
<td><?php echo $catlist[$i]->MSME_RegNO; ?></td>
<td><?php echo $catlist[$i]->MSME_Category; ?></td>
<?php $encoded_mail = base64_encode($catlist[$i]->VendorEmail);?>
<?php $encoded_id = base64_encode($catlist[$i]->VendorID);?>
<td><?php echo anchor('Vendormail/index/'.$encoded_mail .'/'.$encoded_id , 'Send Mail', 'class="btn btn-info"');?></td>
<td><a style=" background-color: rgba(106, 200, 35, 0.61);" href="<?php echo base_url(); ?>index.php/Vendor_retrieve/edit_data/<?php echo $catlist[$i]->VendorID?>" class="btn btn-info" role="button">Edit</a></td>
<!-- <td><?php echo anchor('Vendor_retrieve/edit_data/'.$catlist[$i]->VendorID, ' Edit');?></td> -->
<td><a style=" background-color: #f85959;" href="<?php echo base_url(); ?>index.php/Vendor_retrieve/delete_data/<?php echo $catlist[$i]->VendorID?>" class="btn btn-info" role="button">Delete</a></td>
<!-- <td><?php echo anchor('Vendor_retrieve/delete_data/'.$catlist[$i]->VendorID, ' Delete');?></td> -->
</tr>
<?php } ?>
</tbody>
</table>
<a <?php echo anchor('Send_all/index/'.$encoded_mail .'/'.$encoded_id , 'Send All', 'class="btn btn-info"');?></a>
</div>
</div>
</div>
</div>
</div>
Try below code it may help
$this->load->library('email');
$this->email->initialize($config);
replace your for each code
for($VendorEmail=0;$VendorEmail < count($cust_details);$VendorEmail++)
{}