<?php
$text = "Unit 1: Introduction to C Programming
History and importance of C language
Setting up the development environment
Writing your first C program

Unit 2: Variables, Data Types, and Operators
Understanding data types in C
Declaring and initializing variables
Arithmetic, logical, and relational operators

Unit 3: Control Statements and Loops
Conditional statements: if, if-else, switch
Looping structures: for, while, do-while
Nesting control statements

Unit 4: Arrays and Strings
Declaring and accessing arrays
Multidimensional arrays
String manipulation functions

Unit 5: Functions and Recursion
Function declaration and definition
Passing arguments to functions
Recursive function calls

Unit 6: Pointers and Dynamic Memory Allocation
Understanding pointers and memory addresses
Pointer arithmetic and indirection
Dynamic memory allocation with malloc() and free()

Unit 7: File Handling and I/O Operations
Opening, reading, and writing files
Error handling and file manipulation
Working with text and binary files

Unit 8: Advanced Concepts
Structures and their applications
Unions and their uses
Enumerations and bit fields";
$lines = explode("\n", $text);

$length = count($lines);

for($i=0;$i<$length;$i++)
{
	 $aa = '<li class="py-2">';
	 $bb='';
	if(trim($lines[$i]) != '')
	{
		
		if($i == 0)
		{
		 $bb = '<span class="badge badge-circle badge-soft-primary mr-2"><i class="fa fa-circle" aria-hidden="true"></i></span><span class="strong">';	
		}
		else if(trim($lines[$i-1]) == '')
		{
			 $bb = '<span class="badge badge-circle badge-soft-primary mr-2"><i class="fa fa-circle" aria-hidden="true"></i></span>';
		}else{
		 $bb = '<span class="badge badge-circle badge-soft-primary mr-2"><i data-feather=check></i></span>';
		}
	}
	 $ee=$lines[$i];
	
	 $cc = '</li>';
	$dd = $aa.$bb.$ee.$cc;
	$encodedHtml = htmlspecialchars($dd, ENT_QUOTES);

echo $encodedHtml;
	echo '<br>';
}

?>